public class BeerTest
{

    public static void main(String[] args) {

        Beer obj1=new Beer();
        obj1.setName("哈尔滨啤酒");
        obj1.setAlcohol(0.02);

        Beer obj2=new Beer();
        obj2.setName("雪花啤酒");
        obj2.setAlcohol(0.05);

        double wei1=50;
        double wei2=120;

        System.out.println("名字: "+obj1.getName()+"\t酒精度数: "+obj1.getAlcohol());
        System.out.println("体重为50kg的人喝醉杯数:"+(int)obj1.intoxicated(wei1)
                          +"\t体重为120kg的人喝醉杯数:"+(int)obj1.intoxicated(wei2));

        System.out.println("\n\n名字: "+obj2.getName()+"\t酒精度数: "+obj2.getAlcohol());
        System.out.println("体重为50kg的人喝醉杯数:"+(int)obj2.intoxicated(wei1)
                +"\t体重为120kg的人喝醉杯数:"+(int)obj2.intoxicated(wei2));

    }
}
